###bivariate example
data(unicef)
Hpi(unicef, nstage=1, pilot="amse", pre="scale")
Hpi(unicef, nstage=2, pilot="samse", pre="sphere")
Hpi.diag(unicef, nstage=2, pilot="amse", pre="scale")
### trivariate example
mus <- rbind(c(0,0,0), c(2,2,2))
Sigma <- matrix(c(1, 0.7, 0.7, 0.7, 1, 0.7, 0.7, 0.7, 1), nr=3, nc=3)
Sigmas <- rbind(Sigma, Sigma)
x <- rmvnorm.mixt(n=100, mus=mus, Sigmas=Sigmas, props=c(1/2, 1/2))
Hpi(x)
Hscv(x)
Run the code above in your browser using DataLab